package com.itheima.Array;

public class Text11 {
    public static void main(String[] args) {
        int a, b, c;
        for (a = 0; a <= 20; a++) {
            for (b = 0; b <= (100 - 5 * a) / 3; b++) {
                for (c = 0; c <= (100 - 5 * a - 3 * b) * 3; c++) {
                    if (5 * a + 3 * b + c/3  == 100) {
                        if (a + b + c == 100) {
                            System.out.println("公鸡" + a + "只" + "母鸡" + b + "只" + "小鸡" + c + "只");
                        }
                    }
                }

            }

        }
    }
}
